﻿
/* 
 * Since 2008 - 2012
 */
package com.hh.bss.project.entity;

import java.util.Date;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import com.hh.bss.base.BaseEntity;
import com.hh.bss.util.DateConvertUtils;



public class ContractJob extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "ContractJob";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_CUST_ID = "custId";
	public static final String ALIAS_CONTRACT_ID = "contractId";
	public static final String ALIAS_NAME = "name";
	public static final String ALIAS_DISP_LEVEL = "dispLevel";
	public static final String ALIAS_TRIAL_MONTHS = "trialMonths";
	public static final String ALIAS_INDUSTRY = "industry";
	public static final String ALIAS_FUNCTION = "function";
	public static final String ALIAS_LEVEL = "level";
	public static final String ALIAS_LANGUAGES = "languages";
	public static final String ALIAS_SEX = "sex";
	public static final String ALIAS_MIN_AGE = "minAge";
	public static final String ALIAS_MAX_AGE = "maxAge";
	public static final String ALIAS_OTHER_REQUIRE = "otherRequire";
	public static final String ALIAS_WORK_LOCATION = "workLocation";
	public static final String ALIAS_HIRE_NUM = "hireNum";
	public static final String ALIAS_OPEN_D = "openD";
	public static final String ALIAS_OPEN_RESULT = "openResult";
	public static final String ALIAS_SALARY = "salary";
	public static final String ALIAS_TITLE_ID = "titleId";
	public static final String ALIAS_HR_CONTACTER = "hrContacter";
	public static final String ALIAS_AR_CONTACTER = "arContacter";
	public static final String ALIAS_INTERVIEWER_FLOW = "interviewerFlow";
	public static final String ALIAS_COMMENT = "comment";
	public static final String ALIAS_CREATOR = "creator";
	public static final String ALIAS_CREATE_DT = "createDt";
	public static final String ALIAS_MODIFIER = "modifier";
	public static final String ALIAS_MODIFIED_DT = "modifiedDt";
	
	//date formats
	public static final String FORMAT_OPEN_D = DATE_FORMAT;
	public static final String FORMAT_CREATE_DT = DATE_FORMAT;
	public static final String FORMAT_MODIFIED_DT = DATE_FORMAT;
	public static final String FORMAT_OFFER_DT = DATE_TIME_FORMAT;
	
    public static int jdTypeCn=1;
    public static int jdTypeEn=2;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	
	private java.lang.Integer id;
	@NotNull 
	private java.lang.Integer custId;
	@NotNull 
	private java.lang.Integer contractId;
	@NotBlank @Length(max=100)
	private java.lang.String name;
	@NotNull 
	private java.lang.Integer dispLevel;
	@NotNull @Max(32767)
	private Integer trialMonths;
	@NotNull 
	private java.lang.Integer industry;
	@NotNull 
	private java.lang.Integer function;
	@NotNull 
	private java.lang.Integer level;
	@Length(max=100)
	private java.lang.String languages;
	@Length(max=1)
	private java.lang.String sex;
	@Max(32767)
	private Integer minAge;
	@Max(32767)
	private Integer maxAge;
	@Length(max=65535)
	private java.lang.String otherRequire;
	
	private java.lang.Integer workLocation;
	@Max(32767)
	private Integer hireNum;
	
	private java.util.Date openD;
	@Length(max=1000)
	private java.lang.String openResult;
	@Length(max=2000)
	private java.lang.String salary;
	
	private java.lang.Integer titleId;
	
	private java.lang.Integer hrContacter;
	
	private java.lang.Integer arContacter;
	@Length(max=2000)
	private java.lang.String interviewerFlow;
	@Length(max=1000)
	private java.lang.String comment;
	@Length(max=50)
	private java.lang.String creator;
	
	private java.util.Date createDt;
	@Length(max=50)
	private java.lang.String modifier;
	
	private java.util.Date modifiedDt;
	//columns END
	private String jobNo;
	private String jobNature;
	private Integer projectId;
	private String duty;
	private String requirement;
	private Integer status;
	private String closeReason;
	private String titleName;
	private String custName;
	private String openDString;
	private String contractNo;
	private Integer companyId;
	
	//MC(职位负责人)，PC(合作顾问)，BA(业务助理),
	private Integer jobManagerId;
	private Integer jobCooperId;
	private Integer jobAssistId;
	
	private String jobManager;
	private String jobCooper;
	private String jobAssist;
	
	private String jobFile;
	
	private Integer isPub;
	private String  auditor;
	private Date auditDt;
	
	
	public String getAuditor() {
		return auditor;
	}
	public void setAuditor(String auditor) {
		this.auditor = auditor;
	}
	public Date getAuditDt() {
		return auditDt;
	}
	public void setAuditDt(Date auditDt) {
		this.auditDt = auditDt;
	}

	public Integer getIsPub() {
		return isPub;
	}

	public void setIsPub(Integer isPub) {
		this.isPub = isPub;
	}

	/**预计服务费*/
	private Double servicesCharge;
	/**预计Offer时间*/
	private Date offerDt;
	
	/**直属上司*/
	private String direct;
	
	public String getDirect() {
		return direct;
	}

	public void setDirect(String direct) {
		this.direct = direct;
	}

	public Double getServicesCharge() {
		return servicesCharge;
	}

	public void setServicesCharge(Double servicesCharge) {
		this.servicesCharge = servicesCharge;
	}

	public String getOfferDtString() {
		return DateConvertUtils.format(getOfferDt(), FORMAT_OFFER_DT);
	}
	public void setOfferDtString(String value) {
		setOfferDt(DateConvertUtils.parse(value, FORMAT_OFFER_DT,java.util.Date.class));
	}
	public Date getOfferDt() {
		return offerDt;
	}

	public void setOfferDt(Date offerDt) {
		this.offerDt = offerDt;
	}

	public Integer getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}

	
	
	public String getJobFile() {
		return jobFile;
	}

	public void setJobFile(String jobFile) {
		this.jobFile = jobFile;
	}

	public String getContractNo() {
		return contractNo;
	}

	public void setContractNo(String contractNo) {
		this.contractNo = contractNo;
	}

	public String getCustName() {
		return custName;
	}

	public void setCustName(String custName) {
		this.custName = custName;
	}


	public Integer getJobManagerId() {
		return jobManagerId;
	}

	public void setJobManagerId(Integer jobManagerId) {
		this.jobManagerId = jobManagerId;
	}

	public Integer getJobCooperId() {
		return jobCooperId;
	}

	public void setJobCooperId(Integer jobCooperId) {
		this.jobCooperId = jobCooperId;
	}

	public Integer getJobAssistId() {
		return jobAssistId;
	}

	public void setJobAssistId(Integer jobAssistId) {
		this.jobAssistId = jobAssistId;
	}

	public String getJobManager() {
		return jobManager;
	}

	public void setJobManager(String jobManager) {
		this.jobManager = jobManager;
	}

	public String getJobCooper() {
		return jobCooper;
	}

	public void setJobCooper(String jobCooper) {
		this.jobCooper = jobCooper;
	}

	public String getJobAssist() {
		return jobAssist;
	}

	public void setJobAssist(String jobAssist) {
		this.jobAssist = jobAssist;
	}

	public String getTitleName() {
		return titleName;
	}

	public void setTitleName(String titleName) {
		this.titleName = titleName;
	}

	public String getDuty() {
		return duty;
	}

	public void setDuty(String duty) {
		this.duty = duty;
	}

	public String getRequirement() {
		return requirement;
	}

	public void setRequirement(String requirement) {
		this.requirement = requirement;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getCloseReason() {
		return closeReason;
	}

	public void setCloseReason(String closeReason) {
		this.closeReason = closeReason;
	}

	public Integer getProjectId() {
		return projectId;
	}

	public void setProjectId(Integer projectId) {
		this.projectId = projectId;
	}

	public String getJobNo() {
		return jobNo;
	}

	public void setJobNo(String jobNo) {
		this.jobNo = jobNo;
	}

	

	

	public String getJobNature() {
		return jobNature;
	}

	public void setJobNature(String jobNature) {
		this.jobNature = jobNature;
	}

	public ContractJob(){
	}

	public ContractJob(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setCustId(java.lang.Integer value) {
		this.custId = value;
	}
	
	public java.lang.Integer getCustId() {
		return this.custId;
	}
	public void setContractId(java.lang.Integer value) {
		this.contractId = value;
	}
	
	public java.lang.Integer getContractId() {
		return this.contractId;
	}
	public void setName(java.lang.String value) {
		this.name = value;
	}
	
	public java.lang.String getName() {
		return this.name;
	}
	public void setDispLevel(java.lang.Integer value) {
		this.dispLevel = value;
	}
	
	public java.lang.Integer getDispLevel() {
		return this.dispLevel;
	}
	public void setTrialMonths(Integer value) {
		this.trialMonths = value;
	}
	
	public Integer getTrialMonths() {
		return this.trialMonths;
	}
	public void setIndustry(java.lang.Integer value) {
		this.industry = value;
	}
	
	public java.lang.Integer getIndustry() {
		return this.industry;
	}
	public void setFunction(java.lang.Integer value) {
		this.function = value;
	}
	
	public java.lang.Integer getFunction() {
		return this.function;
	}
	public void setLevel(java.lang.Integer value) {
		this.level = value;
	}
	
	public java.lang.Integer getLevel() {
		return this.level;
	}
	public void setLanguages(java.lang.String value) {
		this.languages = value;
	}
	
	public java.lang.String getLanguages() {
		return this.languages;
	}
	public void setSex(java.lang.String value) {
		this.sex = value;
	}
	
	public java.lang.String getSex() {
		return this.sex;
	}
	public void setMinAge(Integer value) {
		this.minAge = value;
	}
	
	public Integer getMinAge() {
		return this.minAge;
	}
	public void setMaxAge(Integer value) {
		this.maxAge = value;
	}
	
	public Integer getMaxAge() {
		return this.maxAge;
	}
	public void setOtherRequire(java.lang.String value) {
		this.otherRequire = value;
	}
	
	public java.lang.String getOtherRequire() {
		return this.otherRequire;
	}
	public void setWorkLocation(java.lang.Integer value) {
		this.workLocation = value;
	}
	
	public java.lang.Integer getWorkLocation() {
		return this.workLocation;
	}
	public void setHireNum(Integer value) {
		this.hireNum = value;
	}
	
	public Integer getHireNum() {
		return this.hireNum;
	}
	public String getOpenDString() {
		return DateConvertUtils.format(getOpenD(), FORMAT_OPEN_D);
	}
	public void setOpenDString(String value) {
		setOpenD(DateConvertUtils.parse(value, FORMAT_OPEN_D,java.util.Date.class));
	}
	
	public void setOpenD(java.util.Date value) {
		this.openD = value;
	}
	
	public java.util.Date getOpenD() {
		return this.openD;
	}
	public void setOpenResult(java.lang.String value) {
		this.openResult = value;
	}
	
	public java.lang.String getOpenResult() {
		return this.openResult;
	}
	public void setSalary(java.lang.String value) {
		this.salary = value;
	}
	
	public java.lang.String getSalary() {
		return this.salary;
	}
	public void setTitleId(java.lang.Integer value) {
		this.titleId = value;
	}
	
	public java.lang.Integer getTitleId() {
		return this.titleId;
	}
	public void setHrContacter(java.lang.Integer value) {
		this.hrContacter = value;
	}
	
	public java.lang.Integer getHrContacter() {
		return this.hrContacter;
	}
	public void setArContacter(java.lang.Integer value) {
		this.arContacter = value;
	}
	
	public java.lang.Integer getArContacter() {
		return this.arContacter;
	}
	public void setInterviewerFlow(java.lang.String value) {
		this.interviewerFlow = value;
	}
	
	public java.lang.String getInterviewerFlow() {
		return this.interviewerFlow;
	}
	public void setComment(java.lang.String value) {
		this.comment = value;
	}
	
	public java.lang.String getComment() {
		return this.comment;
	}
	public void setCreator(java.lang.String value) {
		this.creator = value;
	}
	
	public java.lang.String getCreator() {
		return this.creator;
	}
	public String getCreateDtString() {
		return DateConvertUtils.format(getCreateDt(), FORMAT_CREATE_DT);
	}
	public void setCreateDtString(String value) {
		setCreateDt(DateConvertUtils.parse(value, FORMAT_CREATE_DT,java.util.Date.class));
	}
	
	public void setCreateDt(java.util.Date value) {
		this.createDt = value;
	}
	
	public java.util.Date getCreateDt() {
		return this.createDt;
	}
	public void setModifier(java.lang.String value) {
		this.modifier = value;
	}
	
	public java.lang.String getModifier() {
		return this.modifier;
	}
	public String getModifiedDtString() {
		return DateConvertUtils.format(getModifiedDt(), FORMAT_MODIFIED_DT);
	}
	public void setModifiedDtString(String value) {
		setModifiedDt(DateConvertUtils.parse(value, FORMAT_MODIFIED_DT,java.util.Date.class));
	}
	
	public void setModifiedDt(java.util.Date value) {
		this.modifiedDt = value;
	}
	
	public java.util.Date getModifiedDt() {
		return this.modifiedDt;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("CustId",getCustId())
			.append("ContractId",getContractId())
			.append("Name",getName())
			.append("DispLevel",getDispLevel())
			.append("TrialMonths",getTrialMonths())
			.append("Industry",getIndustry())
			.append("Function",getFunction())
			.append("Level",getLevel())
			.append("Languages",getLanguages())
			.append("Sex",getSex())
			.append("MinAge",getMinAge())
			.append("MaxAge",getMaxAge())
			.append("OtherRequire",getOtherRequire())
			.append("WorkLocation",getWorkLocation())
			.append("HireNum",getHireNum())
			.append("OpenD",getOpenD())
			.append("OpenResult",getOpenResult())
			.append("Salary",getSalary())
			.append("TitleId",getTitleId())
			.append("HrContacter",getHrContacter())
			.append("ArContacter",getArContacter())
			.append("InterviewerFlow",getInterviewerFlow())
			.append("Comment",getComment())
			.append("Creator",getCreator())
			.append("CreateDt",getCreateDt())
			.append("Modifier",getModifier())
			.append("ModifiedDt",getModifiedDt())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof ContractJob == false) return false;
		if(this == obj) return true;
		ContractJob other = (ContractJob)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

